<template>
  <div>
    <header-com header-name="特价商品"></header-com>
    <van-tabs @click="listChange" offset-top="40px" animated sticky v-model="active">
      <van-tab name="spring" title="春季水果">
        <div class="listHeader">
          热卖TOP10
        </div>
        <fruit-list type="discount"></fruit-list>
      </van-tab>
      <van-tab name="summer" title="夏季水果">
        <div class="listHeader">
          热卖TOP10
        </div>
        <fruit-list type="discount"></fruit-list>
      </van-tab>
      <van-tab name="autumn" title="秋季水果">
        <div class="listHeader">
          热卖TOP10
        </div>
        <fruit-list type="discount"></fruit-list>
      </van-tab>
      <van-tab name="winter" title="冬季水果">
        <div class="listHeader">
          热卖TOP10
        </div>
        <fruit-list type="discount"></fruit-list>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import fruitList from "@/components/fruitList/fruitList";
import headerCom from "@/components/header/header";
import FruitList from "@/components/fruitList/fruitList";
export default {
  name: "discount",
  data(){
    return{
      active:1
    }
  },
  components:{
    FruitList,
    headerCom
  },
  methods:{
    listChange(name){
      console.log(name)
    }
  }
}
</script>

<style scoped lang="less">
.listHeader{
  text-align: center;
  height: 35px;
  line-height: 35px;
  color: #4bd863;
  font-size: 18px;
  font-weight: bold;
}
</style>
